<?php

namespace App\Http\Controllers\admin;

use App\Dao\CommonDao;
use App\Dao\LineUpPriceDao;
use App\Services\Code;

class PricesOrdersController extends BaseController
{
    public function prices(){
        if(getIsHasPage()){
            return  Code::message('',200,CommonDao::pricesOrdersPage(request()->all()));
        }
        return view('admin.prices.prices');
    }

    public function prices_add()
    {
        if(isPost()){
            $params = request()->all();
            $params['shop_id'] = getShopId();
            LineUpPriceDao::addCrData($params);
            return Code::message('',200);
        }
        return view('admin.prices.prices_add');
    }
}
